#include <bits/stdc++.h>
#define MAXN 100005
using namespace std;
int n,r[MAXN];

int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);

    scanf("%d",&n);
    for(int i=1;i<=n;i++) scanf("%d",&r[i]);

    sort(r+1,r+n+1);
    int cnt1=0,cnt2=0,now=0;
    for(int i=1;i<=n;i++){
        if(r[i]>now){
            now=r[i];
            cnt1+=cnt2;
            cnt2=0;
        }
        if(cnt1!=0) cnt1--;
        cnt2++;
    }

    printf("%d",cnt1+cnt2);
    return 0;
}